package com.qd.common.panda.domain.enums;

/**
 * 车辆类型:0燃油车 1新能源
 *
 * @author sjk
 */
public enum CarTypeEnum {
    /**
     * 燃油车
     */
    FUEL_CAR(0, "燃油车"),
    /**
     * 新能源
     */
    NEW_ENERGY(1, "新能源");

    final Integer code;
    final String msg;

    CarTypeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static String idToDisplay(Integer code) {
        if (null == code) {
            return "";
        }
        String msg = "";
        switch (code) {
            case 0:
                msg = FUEL_CAR.getMsg();
                break;
            case 1:
                msg = NEW_ENERGY.getMsg();
                break;
            default:
                break;
        }
        return msg;
    }
}
